<template>
  <div class="box">
    <van-nav-bar title="搜索" left-arrow />
    <!-- 搜索封装 -->
    <search></search>
    <!-- tab切换 -->
    <van-tabs v-model:active="active">
      <van-tab title="标签 1">内容 1</van-tab>
      <van-tab title="标签 2">内容 2</van-tab>
      <van-tab title="标签 3">内容 3</van-tab>
      <van-tab title="标签 4">内容 4</van-tab>
    </van-tabs>
    <!-- 轮播图封装 -->
    <swiper :images="images"></swiper>
  </div>
</template>

<script setup>
import { ref } from "vue";
// 先引入
import search from "@/components/search.vue";
import swiper from "@/components/swiper.vue";

// 引入接口
import { swiperdataApi } from "@/api/api";
let images = ref([]);

const swipeFun = () => {
  swiperdataApi().then((res) => {
    images.value = res.data.message;
  });
};
swipeFun();
</script>

<style lang="scss" scoped></style>
